﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class IndentBll : BaseBll<MODEL.Indent>
    {
        private const string _type = "IndentDal";
        private IDAL.IIndentDal _dal;
        public IndentBll()
            : base(_type)
        {
            _dal = base.dal as IDAL.IIndentDal;
            if (_dal == null)
            {
                throw new NullReferenceException(_type);
            }
        }
        public int addall(List<MODEL.Indent> list)
        {
            return _dal.addall(list);
        }
        public List<MODEL.Indent> showaddr(string addr)
        {
            return _dal.show(addr);
        }

        /// <summary>
        /// 分页显示
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="count"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public List<MODEL.Indent> IndentShow(int pageindex, int pagesize, out int count, string name)
        {
            return _dal.IndentShow(pageindex,pagesize,out count,name);  
        }
        /// <summary>
        /// 查询商品
        /// </summary>
        /// <returns></returns>
        public List<MODEL.Shopping> shopping()
        {
            return _dal.shopping();
        }
    }
}
